package cn.doitedu.vueapi.controller.olap;


import cn.doitedu.vueapi.pojo.olap.FlowOv;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@CrossOrigin
@RestController
public class FlowController {


    @GetMapping(value="flow/ov")
    public List<FlowOv> getFlow(String start,String end){

        System.out.println("flowcontroller  "  + start + " - " + end);
        FlowOv ov1 = new FlowOv("2020-02-01", 200, 300, 238.3f, 3289.2f);
        FlowOv ov2 = new FlowOv("2020-02-01", 200, 300, 238.3f, 3289.2f);
        FlowOv ov3 = new FlowOv("2020-02-01", 200, 300, 238.3f, 3289.2f);
        ArrayList<FlowOv> ovs = new ArrayList<>();
        ovs.add(ov1);
        ovs.add(ov2);
        ovs.add(ov3);

        return ovs;
    }

    @GetMapping(value="echarts/bar")
    public List<Integer> getBar(){
        ArrayList<Integer> res = new ArrayList<>();
        res.add(30);
        res.add(60);
        res.add(30);
        res.add(60);
        res.add(30);
        res.add(70);
        return res;
    }


}
